#ifndef __ENCODE_H
#define __ENCODE_H

#include "headfile.h"

struct encoder_state
{
	int16_t diff;
	uint8_t pressed;
	uint8_t data_state;
};

extern struct encoder_state encoder;

void encode_diff_change(struct encoder_state *encoder,int16_t diff);
void encode_pressed_change(struct encoder_state *encoder,uint8_t press);
int8_t get_encde_diff(struct encoder_state *encoder);
int8_t get_encode_press(struct encoder_state *encoder);



#endif




